<template>
	<view class="">
		<view class="indexHeaBox">
			<view class="leftImg" @click="open2">
				<image v-if="$i18n.locale == 'ft'" src="../../static/img/zh.png" alt=""></image>
				<image v-if="$i18n.locale == 'en'" src="../../static/img/en.png" alt=""></image>
				<image v-if="$i18n.locale == 'jp'" src="../../static/img/rb.png" alt=""></image>
				<image v-if="$i18n.locale == 'ko'" src="../../static/img/hg.png" alt=""></image>
				<image v-if="$i18n.locale == 'zh'" src="../../static/img/zh.png" alt=""></image>
				<p v-if="$i18n.locale == 'ft'">港澳繁體</p>
				<p v-if="$i18n.locale == 'en'">English</p>
				<p v-if="$i18n.locale == 'jp'">にほんご</p>
				<p v-if="$i18n.locale == 'ko'">한국어</p>
				<p v-if="$i18n.locale == 'zh'">中文简体</p>
			</view>
			<view class="mask2" v-if="show2">
				<view @click="lang('en')">
					<img src="../../static/img/en.png" alt="">
					<text>English</text>
				</view>
				<view @click="lang('ft')">
					<img src="../../static/img/zh.png" alt="">
					<text>港澳繁體</text>
				</view>
				<view @click="lang('zh')">
					<img src="../../static/img/zh.png" alt="">
					<text>中文简体</text>
				</view>
				<view @click="lang('jp')">
					<img src="../../static/img/rb.png" alt="">
					<text>にほんご</text>
				</view>
				<view @click="lang('ko')">
					<img src="../../static/img/hg.png" alt="">
					<text>한국어</text>
				</view>
			</view>
			<view class="rightImg">
				<!-- <image @click="goPage('../recentNews/index')" src="../../static/images/41.png" mode=""></image>
				<view class="rightImgLine"></view> -->
				<image @click="islogin()" src="../../static/images/23.png" mode=""></image>
				<view v-if="info.email" class="rightImgName">
					{{info ? info.email : $t('login.title35')}}
				</view>
				<image @click="loginouts()" class="logout" src="../../static/images/logout.png" mode=""></image>
			</view>
			<view class="sjhsuid">
				UID：{{info ? info.uid : ""}}
			</view>
		</view>
		<view class="indexNav">
			<view class="indexNavIt" v-for="(item,index) in navList" :key="index" @click="goPage(item.path)">
				<image :src="item.img" mode=""></image>
				{{item.title}}
			</view>
		</view>
		<view class="linehjghj">
			<view class="lineLeft">

			</view>
		</view>
		<view class="tongjiBox">
			<view class="tongjiBoxTitle">
				{{$t('indexTitle.title1')}}
			</view>
			<view class="tongjiNav">
				<div class="conNavOneItdada">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gocunkuan()">{{$t('indexTitle.title3')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(0)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(1)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title10')}}</p>
							<p>{{balance[0] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<div class="conNavOneItdada" style="background-color: #ffca93;">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gotixian(0)">{{$t('indexTitle.title4s')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(1)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(2)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title11')}}</p>
							<p>{{balance[1] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<div class="conNavOneItdada" style="background-color: #8ec8fa;">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gotixian(1)">{{$t('indexTitle.title4s')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(2)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(3)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title12')}}</p>
							<p>{{balance[2] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<!-- <div class="conNavOneItdada" style="background-color: #277af5;">
					<img src="../../static/images/55.png" alt="">
					<div class="conNavOneItRi">
						<p>{{$t('allocation.title13')}}</p>
						<p>{{balance[3] || '0.00'}} USD</p>
						<div class="conNavOneItRiBut">
							<u-button type="primary" :custom-style="customStyleThree" size="mini" style="width: 96rpx;"
								@click="gozhuanzhang(3)">{{$t('indexTitle.title4')}}</u-button>
						</div>
					</div>
				</div> -->
			</view>
		</view>
		<view class="conLineBox"></view>
		<view class="conBox">
			<view class="conOne conThree"  style="display: none;">
				<view class="conThreeTitle">
					<view class="conThreeTi">
						<p>{{$t('indexTitle.title5')}}</p>
						<view class="lineBox"></view>
					</view>
				</view>
				<view class="shujutongjiBoxTow">
					<p style="font-size: 15px;font-weight: 600;margin: 15px 0;">{{$t('indexTitle.title1')}}</p>
					<!-- <view class="jintuLine">
						<view class="jintuLineXuanzhong">
							
						</view>
					</view> -->
					<!-- <view class="" style="margin: 20px 0px;"> -->
						<qiun-data-charts :chartData="chartDataPie" :echartsH5="true" :echartsApp="true"
							background="none" :eopts="eopts" />
					<!-- </view> -->

					<view class="tongjiText">
						<view class="tongjiTextOne">
							<!-- <view class="tongjiTexTit">
								<view class="lineOne lineOneBox"></view>
								<P>{{$t('indexTitle.title6')}}</P>
							</view> -->
							<view class="tongjiTexTit">
								<view class="lineTow lineOneBox"></view>
								<P>{{$t('allocation.title10')}}</P>
							</view>
							<view class="tongjiTexTit">
								<view class="lineThree lineOneBox"></view>
								<P>{{$t('allocation.title11')}}</P>
							</view>
							<view class="tongjiTexTit">
								<view class="lineFour lineOneBox"></view>
								<P>{{$t('allocation.title12')}}</P>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="conOne conThree">
				<view class="conThreeTitle">
					<view class="conThreeTi">
						<p>{{$t('indexTitle.title10')}}</p>
						<view class="lineBox"></view>
					</view>
					<p>{{$t('indexTitle.title11')}}
						{{partnerInfo ? partnerInfo.invite_num : 0}}
					</p>
				</view>
				<view class="shujutongjiBox">
					<image :src="partnerInfo.poster_path" mode="" v-if="partnerInfo&&partnerInfo.poster_path"></image>
					<view class="lianjieBox">
						<view>{{partnerInfo ? partnerInfo.domain :'https:/portal.internationalfinanc'}}</view>
						<image src="../../static/images/copy.png" mode="" @click="copys(partnerInfo.domain)"></image>
					</view>
				</view>
			</view>
			<view class="conOne conThree" style="display: none;">
				<view class="conTitTowLeft">
					<view class="yuanBox"></view>
					<p>{{$t('indexTitle.title12')}}</p>
				</view>
				<view class="xiaofeiBox">
					<view class="conNavOneIt">
						<image src="../../static/images/54.png" alt=""></image>
						<view class="conNavOneItRi">
							<p>{{$t('indexTitle.title13')}}
								{{partnerInfo ? partnerInfo.effect_num :'0.00'}}
							</p>
							<p>USD</p>
						</view>
					</view>
					<view class="conNavOneIt">
						<image src="../../static/images/53.png" alt=""></image>
						<view class="conNavOneItRi">
							<p>{{$t('indexTitle.title14')}}2024-04-23</p>
						</view>
					</view>
				</view>
				<view class="xiaofeiBut">
					<view class="xiaofeiButLeft">
						<u-button type="warning" :custom-style="customStyleOne"
							size="mini">{{$t('indexTitle.title3')}}</u-button>
						<u-button type="primary" :custom-style="customStyleTow"
							size="mini">{{$t('indexTitle.title4')}}</u-button>
					</view>
					<view class="xiaofeiButRight">
						<p>{{partnerInfo ? partnerInfo.total_revenue :'0.00'}}</p>
						<p>USD</p>
					</view>
				</view>
				<view class="xiaofeiText">
					<view class="tongjiTexTitTow">
						<view class="lineTow lineTowBox"></view>
						<P>{{$t('indexTitle.title15')}}</P>
					</view>
					<view class="tongjiTexTitTow">
						<view class="lineFive lineTowBox"></view>
						<P>MTS ID</P>
					</view>
					<view class="tongjiTexTitTow">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title16')}}</P>
					</view>
					<view class="tongjiTexTitTow">
						<view class="lineThree lineTowBox"></view>
						<P></P>
					</view>
				</view>
			</view>
			<view class="conOne conThree">
				<view class="conTitTowLeft">
					<view class="yuanBox"></view>
					<p>{{$t('indexTitle.title17')}}</p>
				</view>
				<!-- <view class="conNavOneItRiBut1">
					<view class="butItewmBox" v-for="(item,index) in countList" :key="index">
						<u-button type="primary" :custom-style="customStyleTow" size="mini">{{item.code}} :
							{{item.count}}</u-button>
					</view>
				</view> -->
				<!-- <view class="xiaofeiText xiaofeiTextThree">
					<view class="tongjiTexTit">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title18')}}</P>
					</view>
					<view class="tongjiTexTit" v-for="(item,index) in countList" :key="index">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title17')}}{{item.code}}</P>
					</view>
				</view> -->
				<view class="paimingForm paimingFormTow">
					<view class="paimingFormIt">
						{{$t('indexTitle.title38')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title39')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title40')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title41')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title42')}}
					</view>
				</view>
				<view class="paimingForm" style="margin-top: 0;" v-if="ordersList.length > 0"
					v-for="(item,index) in ordersList" :key="index">
					<view class="paimingFormIt">
						{{item.number}}
					</view>
					<view class="paimingFormIt">
						{{item.days}}{{$t('activityTitle.title3')}}
					</view>
					<view class="paimingFormIt">
						<!-- {{item.code}} -->
						<u-switch v-if="item.status != 1" v-model="item.fts" size="20" @change="switchchange(item)"></u-switch>
					</view>
					<view class="paimingFormIt">
						{{item.created_at}}
					</view>
					<view class="paimingFormIt" v-if="item.status==0">
						{{Number(item.days) - Number(item.return_days)}}{{$t('activityTitle.title3')}}
					</view>
					<view class="paimingFormIt" v-if="item.status==1">
						{{$t('first.title134')}}
					</view>
				</view>

				<view class="NulllistTxetBox" v-if="ordersList.length==0">
					<image src="../../static/img/empty.png" style="width: 50px;height: 50px;"></image>
					<p>{{$t('indexTitle.title19')}}</p>
				</view>
				
				<view class="fenye" v-if="ordersList.length > 0">
					<view :class="page > 1 ? 'fyactive':''" @click="prevpage">{{$t('indexTitle.title45')}}</view>
					<view class="fycon">{{page}}/{{totalpage}}</view>
					<view :class="page < totalpage ? 'fyactive':''" @click="nextpage">{{$t('indexTitle.title46')}}</view>
				</view>
			</view>
		</view>
		<view class="conLineBox"></view>
		<view class="conBox">
			<view class="conOne conThree">
				<view class="conTitTowLeft">
					<view class="yuanBox"></view>
					<p>{{$t('indexTitle.title20')}}</p>
				</view>
				<view class="contentText">
					{{$t('indexTitle.title21')}}
				</view>
				<view class="conTitTowLeft">
					<view class="yuanBox"></view>
					<p>{{$t('indexTitle.title22')}}</p>
				</view>
				<view class="contentText">
					{{$t('indexTitle.title23')}}
				</view>
			</view>
		</view>
		<view class="conSix">
			<view class="conTextBaBox">
				{{$t('indexTitle.title24')}}
			</view>
			<!-- <view class="conSixText">
				<p>{{$t('indexTitle.title25')}}</p>
				<p>{{$t('indexTitle.title26')}}</p>
			</view> -->
			<!-- <p>{{$t('indexTitle.title27')}}</p> -->
		</view>
		<!-- <view class="bottomTextBox">
			{{$t('indexTitle.title28')}}
		</view> -->
		<view class="notice" v-if="shownotice">
			<view class="noticebox">
				<view class="ntitle">{{$t('recentNews.title2')}}</view>
				<view class="noticecon" v-html="notice"></view>
				<view class="nbtn" @click="shownotice = false">{{$t('recentNews.title7')}}</view>
			</view>
		</view>
		<view class="notice" v-if="loginout">
			<view class="loginoutbox">
				<view class="lbtitle">{{$t('login.title36')}}</view>
				<view class="lbtitle1">{{$t('login.title37')}}</view>
				<view class="lbbtns">
					<view class="lbbtn1" @click="loginout = false">{{$t('login.title38')}}</view>
					<view class="lbbtn2" @click="logout()">{{$t('login.title39')}}</view>
				</view>
			</view>
		</view>
		<view class="kefu" @click="gokefu">
			<image src="../../static/images/telegram.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	import {
		domains
	} from '../../config/domain.js'
	export default {
		components: {},
		data() {
			return {
				customStyleOne: {
					background: '#fdd02e !important',
					color: '#fff !important',
					border: 'none !important',
					fontSize: '12px !important',
					marginBottom: '5px !important',
				},
				customStyleTow: {
					background: '#5fb4fb !important',
					color: '#fff !important',
					fontSize: '12px !important',
					border: 'none !important',
					marginBottom: '5px !important',
				},
				customStyleThree: {
					background: '#5fb4fb !important',
					color: '#fff !important',
					fontSize: '12px !important',
					border: 'none !important',
					marginBottom: '5px !important',
					marginLeft: '5px !important',
				},
				navList: [{
						'title': this.$t('indexTitle.title29'),
						"img": '../../static/images/3.png',
						"path": '../index/index'
					},
					{
						'title': this.$t('indexTitle.title30'),
						"img": '../../static/images/19.png',
						"path": '../activity/index'
					},
					{
						'title': this.$t('indexTitle.title31'),
						"img": '../../static/images/17.png',
						"path": '../configuration/index'
					},
					{
						'title': this.$t('indexTitle.title33'),
						"img": '../../static/images/15.png',
						"path": '../recharge/record'
					},
					{
						'title': this.$t('indexTitle.title34'),
						"img": '../../static/images/13.png',
						"path": '../vipStructure/vipStructure'
					},
					{
						'title': this.$t('indexTitle.title36'),
						"img": '../../static/images/9.png',
						"path": '../myPlatform/downloadPlatform'
					},
					{
						'title': this.$t('indexTitle.title32'),
						"img": '../../static/images/5.png',
						"path": '../userProfile/index'
					},
					{
						'title': this.$t('indexTitle.title35'),
						"img": '../../static/images/7.png',
						"path": '../recentNews/index'
					},
					// {
					// 	'title': this.$t('indexTitle.title37'),
					// 	"img": '../../static/images/11.png',
					// 	"path": '../ranking/index'
					// },
				],
				show2: false,
				info: [],
				shownotice: false,
				notice: '',
				loginout: false,
				balance: [],
				partnerInfo: {},
				ordersList: [],
				countList: [],
				// 饼状图
				chartData: {},
				// opts:opts uCharts配置
				eopts: {
					color: ["#3287f7", "#ffb87c", "#7cdeb9", "#f26f84", "#6fccf0", "#a16af0"],
					legend: {
						show: false
					}
				},
				chartDataPie: {
					"series": [{
						'type': 'pie',
						radius: '55%',
						label: {
							normal: {
								formatter: "{b}:\n{c}\n{d}%", //百分比之后换行显示文字
								color: '#555'
							},
							color: '#555'
						},
						data: []
					}]
				},
				kefuurl:'',
				page:1,
				totalpage:1
			}
		},
		onLoad() {
			this.getServerData();
			this.getkefu()
		},
		onShow() {
			if (uni.getStorageSync('noticeshow') != '' && uni.getStorageSync('noticeshow') == 123) {
				this.notice = '';
				uni.setStorageSync('noticeshow', 456);
				this.getnotice()
			}
			this.info = [];
			this.shownotice = false;
			this.getinfo()
			this.getbalance()
			this.getorders()
			this.getpartnerInfo();
		},
		onReady() {},
		methods: {
			getkefu(){
				let url = domains + 'api/default/setting?key=sign_kefu';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.kefuurl = res.data.data
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			gokefu(){
				window.open(this.kefuurl)
			},
			getServerData() {
				setTimeout(() => {
					//模拟服务器返回数据，如果数据格式和标准格式不同，需自行按下面的格式拼接
					let res = {
						categories: ["2016", "2017", "2018", "2019", "2020", "2021"],
						series: [{
							name: "实值",
							data: [35, 36, 31, 33, 13, 34]
						}]
					};
					this.chartData = JSON.parse(JSON.stringify(res));
				}, 500);
			},

			getorders() {
				let url = domains + 'api/orders';
				let mytype = 'get';
				let data = {
					page:this.page
				}
				uni.request({
					url,
					method: mytype,
					data,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							for(let i = 0;i < res.data.data.orders.data.length;i++){
								if(res.data.data.orders.data[i].ft == 0){
									res.data.data.orders.data[i].fts = false
								}
								if(res.data.data.orders.data[i].ft == 1){
									res.data.data.orders.data[i].fts = true
								}
							}
							this.ordersList = res.data.data.orders.data
							this.totalpage = res.data.data.orders.last_page
							this.countList = res.data.data.count;
							this.countList.forEach((it,index)=>{
								it.value=it.count;
								it.name=it.code;
							})
							console.log(this.countList);
							this.chartDataPie= {
								"series": [{
									'type': 'pie',
									radius: '55%',
									label: {
										normal: {
											formatter: "{b}:\n{c}\n{d}%", //百分比之后换行显示文字
											color: '#555'
										},
										color: '#555'
									},
									data: this.countList
								}]
							}
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getbalance() {
				let url = domains + 'api/balance';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.balance = res.data.data
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getpartnerInfo() {
				let url = domains + 'api/user/partnerInfo';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.partnerInfo = res.data.data
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getinfo() {
				let url = domains + 'api/user/info';
				let mytype = 'post';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.info = res.data.data
							uni.setStorage({
								key: 'info',
								data: res.data.data
							})
						} else if (res.data.code == 999) {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
							setTimeout(function() {
								uni.navigateTo({
									url: '/pages/login/newlogin'
								})
							}, 1500)
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getnotice() {
				let url = domains + 'api/default/setting?key=inform_notice';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.notice = JSON.parse(res.data.data)[uni.getStorageSync('lang')]
							if (this.notice) {
								this.shownotice = true
							}
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			switchchange(e){
				let url = domains + 'api/delft';
				let mytype = 'post';
				let data = {
					id:e.id
				}
				uni.request({
					url,
					method: mytype,
					data,
					header: {
						'content-type': 'application/x-www-form-urlencoded' ,//自定义请求头信息
						'Lang':uni.getStorageSync('lang'),
						'authorization':uni.getStorageSync('tokenNum')
					},
					success: res => {
						if(res.data.code == 0){
							this.getorders()
						}else if(res.data.code == 999){
								uni.showToast({//提示
									icon:'none',
									title:res.data.msg
								})
								setTimeout(function(){
									uni.navigateTo({
										url:'/pages/login/newlogin'
									})
								},1500)
							}else{
								uni.showToast({//提示
									icon:'none',
									title:res.data.msg
								})
							}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			prevpage(){
				if(this.page > 1){
					this.page--
					this.getorders()
				}
			},
			nextpage(){
				if(this.page < this.totalpage){
					this.page++
					this.getorders()
				}
			},
			islogin() {
				if (this.info) {
					// this.loginout = true;
				} else {
					uni.showToast({ //提示
						icon: 'none',
						title: this.$t('login.title35')
					})
					setTimeout(function() {
						uni.navigateTo({
							url: '/pages/login/newlogin'
						})
					}, 1500)
				}
			},
			loginouts(){
				this.loginout = true;
			},
			logout() {
				uni.removeStorage({
					key: 'token'
				})
				uni.removeStorage({
					key: 'tokenNum'
				})
				uni.removeStorage({
					key: 'info'
				})
				uni.showToast({ //提示
					icon: 'none',
					title: this.$t('login.title40')
				})
				setTimeout(function() {
					uni.navigateTo({
						url: '/pages/login/newlogin'
					})
				}, 1500)
				this.loginout = false
			},
			gorecord(e){
				uni.navigateTo({
					url: '/pages/recharge/record?tab=' + e
				})
			},
			gozhuanzhang(e) {
				uni.navigateTo({
					url: '/pages/recharge/transfer?type=' + e
				})
			},
			gotixian(e) {
				uni.navigateTo({
					url: '/pages/recharge/withdraw?type=' + e
				})
			},
			gocunkuan() {
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				})
			},
			open2() {
				this.show2 = !this.show2
			},
			lang(e) {
				this.$i18n.locale = e;
				localStorage.setItem('lang', e);
				this.show2 = false;
				this.navList = [{
						'title': this.$t('indexTitle.title29'),
						"img": '../../static/images/3.png',
						"path": '../index/index'
					},
					{
						'title': this.$t('indexTitle.title30'),
						"img": '../../static/images/19.png',
						"path": '../activity/index'
					},
					{
						'title': this.$t('indexTitle.title31'),
						"img": '../../static/images/17.png',
						"path": '../configuration/index'
					},
					{
						'title': this.$t('indexTitle.title33'),
						"img": '../../static/images/15.png',
						"path": '../recharge/record'
					},
					{
						'title': this.$t('indexTitle.title34'),
						"img": '../../static/images/13.png',
						"path": '../vipStructure/vipStructure'
					},
					{
						'title': this.$t('indexTitle.title36'),
						"img": '../../static/images/9.png',
						"path": '../myPlatform/downloadPlatform'
					},
					{
						'title': this.$t('indexTitle.title32'),
						"img": '../../static/images/5.png',
						"path": '../userProfile/index'
					},
					{
						'title': this.$t('indexTitle.title35'),
						"img": '../../static/images/7.png',
						"path": '../recentNews/index'
					},
				]
				this.$emit("toTime", "我来自子组件")
			},
			copys(value) {
				uni.setClipboardData({
					data: value, //要被复制的内容
					success: () => { //复制成功的回调函数
						uni.showToast({ //提示
							icon: 'none',
							title: this.$t('first.title115')
						})
					}
				});
			},
			goPage(path) {
				uni.navigateTo({
					url: path
				})
			},
			switchLang() {
				uni.navigateTo({
					url: ''
				})
			},
		}
	}
</script>

<style lang="scss">
	* {
		box-sizing: border-box;
	}

	.indexHeaBox {
		width: 100%;
		height: 180px;
		background-image: url('../../static/images/51.jpg');
		background-repeat: no-repeat;
		background-size: 100% 100%;
		display: flex;
		font-size: 12px;
		color: #fff;
		justify-content: space-between;
		padding: 10px 15px;
	}
	.sjhsuid{
		position: absolute;
		top: 42px;
		right: 50px;
	}

	.leftImg {
		height: 40px;
		display: flex;
		align-items: center;

		image {
			width: 25px;
			height: 25px;
			margin-right: 5px;
		}
	}

	.rightImg {
		display: flex;
		height: 40px;
		align-items: center;

		image:first-child {
			width: 16px;
			height: 18px;
			margin-right: 5px;
		}

		image:last-child {
			width: 18px;
			height: 18px;
		}

		.rightImgLine {
			width: 1px;
			background-color: #fff;
			height: 20px;
			margin: 0px 5px;
		}

		.rightImgName {
			padding: 2px 5px;
			background-color: #6aa3ea;
			color: #000;
		}
	}

	.indexNav {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin: 15px 0 10px;

		.indexNavIt {
			width: 25%;
			display: flex;
			align-items: center;
			flex-direction: column;
			font-size: 14px;
			color: #333;
			margin-bottom: 10px;
			text-align: center;
		
			image {
				width: 20px;
				height: 18px;
				margin-bottom: 10px;
			}
		}
		
		.indexNavIt:nth-child(5) image {
			width: 22px;
		}

		.indexNavIt:nth-child(9) image {
			height: 21px;
		}
	}

	.conLineBox {
		width: 100%;
		height: 7px;
		background-color: #ededed;
	}

	.conBox {
		width: 100%;
		padding: 10px 15px 20px;
		margin-top: 10px;
	}

	.conOne {
		background-color: #f1f3ff;
		border-radius: 5px;
	}

	.conSix {
		padding: 5px 10px 30px;
	}

	.conSix>p:nth-child(1) {
		font-size: 13px;
		font-weight: 600;
		color: #333;
	}

	.conSix p:nth-child(3) {
		width: 300px;
		margin: 0 auto;
		text-align: center;
		line-height: 30px;
		height: 30px;
		font-size: 14px;
		color: #fff;
		cursor: pointer;
		background-color: #fed136;
		border-radius: 30px;
	}

	.conSixText {
		margin: 20px auto 50px;
		text-align: center;
		font-size: 12px;
		color: #333;
		width: 85%;
	}

	.conSixText p {
		margin-bottom: 10px;
	}

	.conTextBaBox {
		width: 100%;
		margin: 0px auto;
		height: 120px;
		background-image: url('../../static/images/52.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
		color: #fff;
		font-size: 12px;
		padding: 20px;
	}

	.conThree {
		width: 100%;
		padding: 15px;
		margin-top: 10px;
		border-radius: 5px;
	}

	.conTitOne {
		display: flex;
		align-items: center;
	}

	.conTitOne image {
		width: 25px;
		height: 15px;
	}

	.conTitOne p {
		width: 50%;
		font-size: 15px;
		color: #333;
		font-weight: 600;
	}

	.conNavOne {
		width: 70%;
		margin: 0 auto;
		padding-bottom: 10px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #e5e6e9;
	}

	.conNavOneIt {
		width: 50%;
		display: flex;
		align-items: center;
		font-size: 13px;
		color: #333;
	}

	.conNavOneIt image {
		width: 35px;
		height: 40px;
		margin-right: 5px;
	}

	.conNavOneItRi p {
		margin: 0;
		font-size: 12px;
		text-align: left;
	}

	// .conNavOneItRi p:nth-child(2) {
	// 	color: #5eb7fa;
	// 	margin: 2px 0px;
	// 	font-weight: 600;
	// }

	.conNavOneItRiButs {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 0px auto 10rpx;
	}

	.butItewmBox {
		width: 28%;
	}

	.conTitTow {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.conTitTowLeft {
		display: flex;
		align-items: center;
		font-size: 14px;
		color: #333;
		font-weight: 600;
	}

	.yuanBox {
		width: 8px;
		height: 8px;
		background-color: #5eb7fa;
		border-radius: 50%;
		margin-right: 5px;
	}

	.conThreeTitle {
		width: 95%;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 5px;
		border-bottom: 1px solid #e5e6e9;
		font-size: 14px;
		color: #333;
	}

	.conThreeTi {
		font-size: 16px;
		color: #6c83bf;
		position: relative;
	}

	.conThreeTitle p {
		margin: 4px 0;
		margin-right: 10px;
	}

	.lineBox {
		position: absolute;
		width: 60px;
		height: 2px;
		background-color: #6c83bf;
		bottom: -5px;
		left: 0;
	}

	.shujutongjiBox {
		height: 200px;
		padding: 0px 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.shujutongjiBoxTow {
		height: 250px;
		padding: 0px 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.shujutongjiBox>image {
		width: 110px;
		height: 110px;
	}

	.lianjieBox {
		width: 100%;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 13px;
		color: #333;
		margin-top: 10px;
	}
	.lianjieBox view{
		flex: 1;
		word-break:break-all;
		margin-right: 20rpx;
	}
	.lianjieBox image {
		width: 22px;
		height: 22px;
		cursor: pointer;
	}

	.tongjiText {
		display: flex;
		width: 100%;
		justify-content: flex-end;
	}

	.tongjiTextOne {
		width: 70%;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.tongjiTexTit {
		display: flex;
		align-items: center;
		width: 50%;
		margin-top: 5px;
		font-size: 12px;
		color: #333;
	}

	.tongjiTexTitTow {
		display: flex;
		align-items: center;
		width: 25%;
		font-size: 12px;
		color: #333;
	}

	.tongjiTexTit p {
		margin: 0;
	}

	.tongjiTexTit span {
		color: #5eb7fa;
	}

	.lineOne {
		background-color: #eff3f6;
	}

	.lineTow {
		background-color: #2791ef;
	}

	.lineThree {
		background-color: #f8ea61;
	}

	.lineFour {
		background-color: #58c1fa;
	}

	.lineFive {
		background-color: #ae7ae2;
	}

	.lineOneBox {
		width: 15px;
		height: 7px;
		border-radius: 7px;
		margin-right: 5px;
	}

	.lineTowBox {
		width: 7px;
		height: 7px;
		border-radius: 7px;
		margin-right: 5px;
	}

	.jintuLine {
		width: 90%;
		margin: 9px auto 10px;
		height: 7px;
		border-radius: 10px;
		background-color: #eef2f5;
	}

	.jintuLineXuanzhong {
		width: 50%;
		height: 7px;
		border-radius: 10px;
		background: linear-gradient(to right, #83c6ef, #238eec);
	}

	.xiaofeiBox {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 20px auto 10px;
	}

	.xiaofeiBox>div {
		margin-bottom: 20px;
	}

	.xiaofeiBut {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #e5e6e9;
		border-top: 1px solid #e5e6e9;
		padding: 10px 60px 10px 20px;
	}

	.xiaofeiButLeft {
		display: flex;
		align-items: center;
		flex-direction: column;
		margin-left: 10px;
	}

	.xiaofeiButRight {
		display: flex;
		align-items: center;
		font-size: 13px;
		color: #333;
	}

	.xiaofeiButRight p:nth-child(2) {
		color: #83c6ef;
	}

	.xiaofeiText {
		padding: 20px 10px 20px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
	}

	.xiaofeiTextThree {
		width: 85%;
		margin: 0 auto;
	}

	.NulllistTxetBox {
		font-size: 12px;
		color: #333;
		height: 100px;
		padding-top: 20px;
		text-align: center;
		border-top: 1px solid #e5e6e9;
	}

	.contentText {
		font-size: 12px;
		color: #333;
		margin-top: 10px;
		margin-bottom: 15px;
		text-align: left;
	}

	.bottomTextBox {
		text-align: center;
		font-size: 12px;
		color: #333;
		width: 80%;
		margin: 10px auto;
	}

	.tongjiBox {
		width: 95%;
		margin: 0 auto;
	}

	.tongjiBoxTitle {
		font-size: 15px;
		font-weight: 600;
		margin-bottom: 10px;
	}

	.linehjghj {
		width: 15%;
		margin: 0px auto 20px;
		height: 5px;
		border-radius: 10px;
		background-color: #eaeaea;
	}

	.lineLeft {
		width: 50%;
		border-radius: 10px;
		height: 5px;
		background-color: #277af5;
	}

	.tongjiNav {
		width: 100%;
		margin: 20px 0;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
	}

	.conNavOneItdada {
		width: 32.5%;
		margin-bottom: 5px;
		border-radius: 10px;
		padding: 10px 8px;
		background-color: #938ced;
		font-size: 12px;
		color: #fff;
	}

	.conNavOneItdada img {
		width: 30px;
		height: 26px;
		margin-right: 5px;
	}

	.conNavOneItRi p {
		margin: 0;
		text-align: left;
	}

	.conNavOneItRi p:nth-child(2) {
		// color: #5eb7fa;
		margin: 2px 0px;
		font-weight: 600;
	}

	.conNavOneItRiBut {
		width: 100%;
		display: flex;
		align-items: center;
	}

	.conNavOneItRiBut1 {
		width: 90%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 10px auto 0px;
	}

	.mask2 {
		position: fixed;
		top: 90rpx;
		left: 30rpx;
		z-index: 99;
		background-color: #ffffff;
		border-radius: 50rpx;
		padding: 10rpx 30rpx;
		font-size: 24rpx;
	}

	.mask2 img {
		width: 44rpx;
		height: 44rpx;
		margin-right: 30rpx;
	}


	.mask2 view {
		display: flex;
		color: #000;
		align-items: center;
		margin: 20rpx;
	}

	.notice {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1111;
		background-color: rgba(0, 0, 0, .4);
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
	}

	.noticebox {
		width: 80%;
		height: 800rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.ntitle {
		width: 100%;
		height: 70rpx;
		font-size: 32rpx;
		color: #000;
		line-height: 70rpx;
		text-align: center;
	}

	.noticecon {
		width: 100%;
		height: 640rpx;
		overflow-y: scroll;
		padding: 10rpx 30rpx;
		font-size: 28rpx;
		color: #000;
	}

	.nbtn {
		width: 70%;
		margin: 20rpx auto;
		height: 50rpx;
		line-height: 50rpx;
		text-align: center;
		font-size: 28rpx;
		color: #fff;
		border-radius: 50rpx;
		background-color: #5eb7fa;
	}

	.loginoutbox {
		width: 80%;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.lbtitle {
		width: 100%;
		height: 100rpx;
		font-size: 16px;
		line-height: 100rpx;
		text-align: center;
	}

	.lbtitle1 {
		width: 100%;
		height: 100rpx;
		font-size: 14px;
		line-height: 100rpx;
		text-align: center;
		margin-bottom: 30rpx;
	}

	.lbbtns {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 50rpx;
		margin-bottom: 40rpx;
	}

	.lbbtn1 {
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 10rpx;
		font-size: 14px;
		color: #000;
		background-color: #f0f0f0;
	}

	.lbbtn2 {
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 10rpx;
		font-size: 14px;
		color: #fff;
		background-color: #238bdf;
	}

	.paimingForm {
		width: 100%;
		display: flex;
		height: 35px;
		margin-top: 10px;
		font-size: 12px;
		align-items: center;
	}

	.paimingFormTow {
		background-color: #278cf4;
		color: #fff;
	}

	.paimingFormIt {
		flex: 1;
		display: flex;
		justify-content: center;
		text-align: center;
	}
	
	.paimingFormIt:nth-child(4) {
		flex: 1.4;
	}
	
	.logout{
		width: 40rpx !important;
		margin-left: 10rpx;
	}
	
	.kefu{
		width: 80rpx;
		height: 80rpx;
		position: fixed;
		bottom: 15%;
		right: 20rpx;
		z-index: 1000;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		
		image{
			width: 80rpx;
			height: 80rpx;
		}
	}
	
	.fenye{
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 30rpx 0;
		font-size: 28rpx;
		color: #999;
	}
	.fycon{
		color: #000;
	}
	.fyactive{
		color: #000;
	}
</style>